chore(deps): migrate to ESLint 9 and @lichtblick/eslint-plugin 2.x#191
Merged
Conversation
Migrate from ESLint 8 to ESLint 9 flat config, aligning with Lichtblick v1.25.0: - Replace .eslintrc.yaml + .eslintignore with eslint.config.mjs (flat config) - Upgrade @lichtblick/eslint-plugin from 1.x to 2.0.7 - Upgrade eslint from 8.x to 9.x - Remove standalone ESLint plugins now bundled in @lichtblick/eslint-plugin 2.x: eslint-plugin-es, eslint-plugin-filenames, eslint-plugin-import, eslint-plugin-jest, eslint-plugin-prettier, eslint-plugin-react, eslint-plugin-react-hooks, @typescript-eslint/eslint-plugin, @typescript-eslint/parser - Disable import/named for TypeScript files (false positives, same as Lichtblick) Security: resolves 3 high-severity minimatch ReDoS vulnerabilities (GHSA-2qfj-455h-2qmm, GHSA-952p-fqcp-g8pc, GHSA-3fvg-4v2m-98jf) that were rooted in the eslint@8 / @lichtblick/eslint-plugin@1.x dependency tree. Audit: 23 vulnerabilities (3 High) -> 19 vulnerabilities (0 High) Lint: 76 errors -> 73 errors (net improvement from autofix of newly detected issues) Resolves #180 Signed-off-by: Carlo van Driesten <carlo.van-driesten@bmw.de>
Autofix from @typescript-eslint/no-unnecessary-type-assertion rule newly enabled by @lichtblick/eslint-plugin 2.x. Removes redundant `as Point3`, `as LinePrimitive`, `as GroundTruth` etc. casts and their now-unused imports. Signed-off-by: Carlo van Driesten <carlo.van-driesten@bmw.de>
cde4db0 to
014dca7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates from ESLint 8 to ESLint 9 with flat config, aligning with Lichtblick v1.25.0 which completed this migration in #1038.
Resolves #180
Context
Issue #180 documented that this migration was blocked because the Lichtblick framework was still on ESLint 8 +
@lichtblick/eslint-plugin@1.x. That blocker is now resolved:eslint@9.38.0+@lichtblick/eslint-plugin@2.0.7create-lichtblick-extensionalso uses ESLint 9Changes
Config migration
.eslintrc.yaml+.eslintignorewitheslint.config.mjs(ESLint 9 flat config)lichtblickPlugin.configs.{base,typescript,react,jest}arrays from the pluginimport/namedfor TypeScript files (false positives — same approach as Lichtblick)Dependency changes
eslint:^8.57.0→^9.38.0@lichtblick/eslint-plugin:^1.0.2→^2.0.7@lichtblick/eslint-plugin@2.x:eslint-plugin-es,eslint-plugin-filenames,eslint-plugin-import,eslint-plugin-jest,eslint-plugin-prettier,eslint-plugin-react,eslint-plugin-react-hooks,@typescript-eslint/eslint-plugin,@typescript-eslint/parserAutofix cleanup
@typescript-eslint/no-unnecessary-type-assertionPoint3,ReferenceLine)Security impact
Resolves 3 high-severity minimatch ReDoS vulnerabilities rooted in the eslint@8 dependency tree:
Verification
yarn build— succeedsyarn test— 68/68 tests passyarn lint:ci— 73 errors (3 fewer than baseline; all pre-existing, none new)yarn audit— 0 high-severity findings